package com.bw.shopping.adapter;

import android.view.View;
import android.widget.ImageView;

import com.bw.mvvm_common.network.load.LoadImage;
import com.bw.shopping.R;
import com.bw.shopping.entity.OrderListEntity;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

/**
 * @author KK
 * @description:
 * @date :2021/10/29 8:14
 */
public class OrderListAdapter extends BaseQuickAdapter<OrderListEntity.DataBean.OrderGoodsListBean, BaseViewHolder> {
    public OrderListAdapter() {
        super(R.layout.item_submitcar);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, OrderListEntity.DataBean.OrderGoodsListBean dataBean) {
        baseViewHolder.setText(R.id.item_submitcar_desc,dataBean.getGoods_desc());
        baseViewHolder.setText(R.id.item_submitcar_sku,dataBean.getGoods_sku());
        baseViewHolder.setText(R.id.item_submitcar_count,""+dataBean.getGoods_count());
        ImageView im = baseViewHolder.findView(R.id.item_submitcar_im);
        LoadImage.loadMatchImg(dataBean.getGoods_icon(),im);
    }
}
